package org.ufinity.hsms.module.alarm;

import org.ufinity.hsms.common.utils.SystemUtils;
import org.ufinity.hsms.module.TabGroupActivity;
import org.ufinity.hsms.module.home.HomeActivity;

import android.app.ActivityGroup;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;

public class AlarmStackActivity extends TabGroupActivity{  
    
	String id = "AlarmActivity";
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		startChildActivity(id, new Intent(getParent(),
				AlarmActivity.class));
	}	
	
	@Override
	public boolean dispatchKeyEvent(KeyEvent event) {
		int length = mIdList.size();
		if (length > 0) {
			if(mIdList.get(length - 1).equals(id)){
				SystemUtils.openOptionsDialog(getParent());
			}
		}
		return super.dispatchKeyEvent(event);
	}
    
}
